home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / Graphic Elements 3 / GEDemo / Cannon.h < prev    next >
Text File  |  1995-06-03  |  1KB  |  75 lines

  1. /*
  2.     Cannon.h
  3.     
  4.     Cannon scene for GEDemo
  5.     
  6.     Copyright 1993 by Al Evans. All rights reserved.
  7.     
  8.     11/3/93
  9.     
  10. */
  11.  
  12. #ifdef applec
  13. #ifndef __cplusplus
  14. #ifndef PRELOAD
  15. #pragma load "::ToolKit.precompile"
  16. #define PRELOAD
  17. #endif
  18. #endif
  19. #endif
  20.  
  21. #ifndef GRAPHELEMENTS
  22. #include "GraphElements.h"
  23. #endif
  24.  
  25. #ifndef GESENSORS
  26. #include "Sensors.h"
  27. #endif
  28.  
  29.  
  30. //Resource numbers of PICTs making up cannon scene
  31. #define rBallPic    600
  32. #define rBallSnd    600
  33. #define rCannonPic    601
  34. #define rSmokePic    602
  35. #define rFireSnd    602
  36. #define rHitSnd        603
  37. #define rFBtnPic    650
  38.  
  39. //Cannon position
  40. #define cannonLeft    390
  41. #define cannonTop    210
  42.  
  43. //Cannon scene planes
  44. #define cannonPlane    rCannonPic
  45. #define ballPlane    cannonPlane - 1
  46. #define smokePlane    cannonPlane + 1
  47. //Button is just in front of background
  48. #define btnPlane    4
  49.  
  50. //Cannon scene IDs
  51. #define cannonID    'CANN'
  52. #define ballID         'BALL'
  53. #define smokeID        'SMOK'
  54. #define fBtnID        'FBtn'
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59.  
  60. Boolean LoadCannonScene(GEWorldPtr world);
  61.  
  62. //Cannonball autochange proc
  63. pascal void DoCannonBall(GEWorldPtr world, GrafElPtr ball);
  64.  
  65. //Cannonball collision proc
  66. pascal void DoBallHit(GEWorldPtr world, GrafElPtr ball, GEDirection dir, 
  67.                                     CollisionPhase phase, GrafElPtr objHit);
  68.  
  69. //Call to start cannon scene animation
  70. pascal void ShootCannon(GEWorldPtr world, GrafElPtr ignore, short fireIt);
  71.  
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75.